﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.Mvc;

namespace AngularCabasi.Controllers
{
    public class User
    {
        public string Name { get; set;}
        public string Last { get; set;}
    }

    public class DefaultController : Controller
    {
        [HttpGet]
        public ActionResult Login()
        {
            return View();
        }

        [HttpPut]
        public ActionResult Login(User user)
        {
            FormsAuthentication.SetAuthCookie(user.Name, false);
            return View();
        }

        public ActionResult Home()
        {
            return View();
        }
    }
}
